<form id="migration" method="post" action="__SELF__" class="form-horizontal ajax-form">
    <input type="hidden" name="id" value="{$order.id}">
    <div class="form-group">
        <label class="col-sm-2">快递公司：</label>
        <div class="col-md-8">
            <select class="form-control" name="ShipperValue">
                <volist name="delivery" id="v">
                <option value ="{$v.title},{$v.code}"
                <?php if($order['logistic']['ShipperCode'] == $v['code'])echo "selected=\"selected\"";?>
                >{$v.title}</option>
                </volist>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2">快递单号：</label>
        <div class="col-md-8">
            <input type="text" class="form-control" name="LogisticCode" value="{$order.logistic.LogisticCode}">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2"></label>
        <div class="col-md-8 text-center">
            <button data-role="submit" class="btn btn-primary">确认</button>
            <button class="btn" data-dismiss="modal">取消</button>
        </div>
    </div>
</form>
<script>
    $(function(){
        $('[data-role="submit"]').click(function(e){
            e.preventDefault();
            var query=$('#migration').serialize();
            var url=$('#migration').attr('action');
            $.post(url,query,function(msg){
                if(msg.status){
                    toast.success(msg.info);
                    setTimeout(function(){
                        window.location.href=msg.url;
                    },1500);
                }else{
                    handleAjax(msg);
                }
            },'json');
        });
    });
</script>